package com.ldh.slf4j;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author LiuDehuai
 * @fileName:Wombat
 * @Date:2020/10/16 19:53
 */
public class Wombat {
    final Logger logger = LoggerFactory.getLogger(Wombat.class);
    Integer t;
    Integer oldT;

    public void setTemperature(Integer temperature) {
        oldT = t;
        t = temperature;
        //debug默认输出到？
        logger.debug("Temperature set to {}. Old temperature was {}.", t, oldT);
        if (temperature.intValue() > 50) {
            //info默认输出到控制台
            logger.info("Temperature has risen above 50 degrees");
        }
    }

    public static void main(String[] args) {
        Wombat wombat = new Wombat();
        wombat.setTemperature(60);
    }
}
